import request from '@/utils/request'

// 查询听课申请列表
export function listMyApply(query) {
  return request({
    url: '/listen/apply/my',
    method: 'get',
    params: query
  })
}

// 查询听课申请列表
export function listApply(query) {
  return request({
    url: '/listen/apply/list',
    method: 'get',
    params: query
  })
}

// 查询听课申请详细
export function getApply(id) {
  return request({
    url: '/listen/apply/' + id,
    method: 'get'
  })
}

// 新增听课申请
export function addApply(data) {
  return request({
    url: '/listen/apply',
    method: 'post',
    data: data
  })
}

// 修改听课申请
export function updateApply(data) {
  return request({
    url: '/listen/apply',
    method: 'put',
    data: data
  })
}

// 删除听课申请
export function delApply(id) {
  return request({
    url: '/listen/apply/' + id,
    method: 'delete'
  })
}



// 导出听课申请
export function exportApply(query) {
  return request({
    url: '/listen/apply/export',
    method: 'get',
    params: query
  })
}


// 审核听课申请
export function checkApply(id) {
  return request({
    url: '/listen/apply/check/' + id,
    method: 'get'
  })
}
